import request from '@/utils/request'

export function add(data) {
  return request({
    url: 'api/inboundOrder',
    method: 'post',
    data
  })
}

export function del(ids) {
  return request({
    url: 'api/inboundOrder/',
    method: 'delete',
    data: ids
  })
}

export function edit(data) {
  return request({
    url: 'api/inboundOrder',
    method: 'put',
    data
  })
}

export function startInboundOrder(inboundOrderNo) {
  return request({
    url: `api/inboundOrder/startInboundOrder/${inboundOrderNo}`,
    method: 'post'
  })
}

export function cancelInboundOrder(inboundOrderNo) {
  return request({
    url: `api/inboundOrder/cancelInboundOrder/${inboundOrderNo}`,
    method: 'post'
  })
}

export default { add, edit, del, startInboundOrder, cancelInboundOrder }
